$(function(){
	  var pickerCreate = document.getElementById('create-picker');
	  var pickerOpen = document.getElementById('open-picker');
	  var pickerClose = document.getElementById('close-picker');
	  var pickerSelect = document.getElementById('select-picker');
	  var pickerRender = document.getElementById('render-picker');
	  var up, up1, up2, animaed;

	  var selectYes = document.getElementById('selectYes');
	  var selectClose = document.getElementById('selectClose');
	  var data = [{
	    "key": "Swift",
	    "value": "Swift"
	  }, {
	    "key": "iOS",
	    "value": "iOS"
	  }, {
	    "key": "Objective-C",
	    "value": "Objective-C"
	  }, {
	    "key": "back homeTown",
	    "value": "back homeTown"
	  }, {
	    "key": "github",
	    "value": "github"
	  }, {
	    "key": "icepy",
	    "value": "icepy"
	  }];

	  var up1Data = data[0], up2Data = data[0];

	  selectYes.addEventListener('click', function() {
	    animaed.finish();
	    console.log(up1Data);
	    console.log(up2Data);

	    //if up1Data or up2Data is empty ,so use UPSelectRowIndexPath and UPThen

	    if (!up1Data && up) {
	      up.UPSelectRowIndexPath(1).UPThen(function(indexPath, value) {
	        console.log(value);
	      })
	    };

	    // if (!up2Data&& up1) {
	    // 	up1.UPSelectRowIndexPath(1).UPThen(function(indexPath,value){
	    // 		console.log(value);
	    // 	})
	    // };

	    //maybe use your datasource is relatively good
	    //data[0]  //你的数据默认选择第一行

	  })

	  selectClose.addEventListener('click', function() {
	    animaed.finish();
	  })

	  pickerCreate.addEventListener('click', function() {
	    up = UIPickerView.createPickerView({
	      dataSource: data,
	      id: 'provincePicker',
	      constraintsId: 'wower',
	      kUP: {
	        kUPCELLHEIGHT: 26,
	        kUPFRICTION: 0.003
	      },
	      valueChange: function(data) {
	        up1Data = data;
	      }
	    });
	    up1 = UIPickerView.createPickerView({
	      dataSource: data,
	      id: 'cityPicker',
	      constraintsId: 'wower1',
	      kUP: {
	        kUPCELLHEIGHT: 26,
	        kUPFRICTION: 0.003
	      },
	      valueChange: function(data) {
	        console.log(data);
	        up2Data = data;
	      }
	    });
	    animaed = CAAnimation.createAnimation({
	      id: 'region-picker'
	    });
	    animaed.start();
	  });

	  pickerClose.addEventListener('click', function() {
	    animaed.finish();
	  });

	  pickerOpen.addEventListener('click', function() {
	    animaed.start();
	  });
})